#define _CRT_SECURE_NO_WARNINGS 1
#include"SeqList.h"

void test1()
{
	SL s1;

	SeqListInit(&s1);

	SeqListPushBack(&s1, 1);
	SeqListPushBack(&s1, 2);
	SeqListPushBack(&s1, 3);
	SeqListPushBack(&s1, 4);
	SeqListPushBack(&s1, 4 );

	SeqListPrint(&s1);

	SeqListPopBack(&s1);

	SeqListPushFront(&s1, 10);
	SeqListPushFront(&s1, 20);
	SeqListPopFront(&s1);
	SeqListPopFront(&s1);

	SeqListInsert(&s1, 2, 10);

	SeqListPrint(&s1);

	printf("%d", SeqListFind(&s1, 10));

	SeqListDestory(&s1);

}

void test2()
{
	SL s1;

	SeqListInit(&s1);
	SeqListPushBack(&s1, 1);
	SeqListPushBack(&s1, 2);
	SeqListPushBack(&s1, 3);
	SeqListPushBack(&s1, 4);
	//SeqListInsert(&s1, 4, 10);
	/*int pos = SeqListFind(&s1, 1);
	if (pos != -1)
	{
		SeqListInsert(&s1, pos, 20);
	}
	else
		printf("find fail!\n");*/

	int pos = SeqListFind(&s1, 1);
	if (pos != -1)
	{
		SeqListErase(&s1, pos);
	}
	else
		printf("find fail!\n");

	SeqListPrint(&s1);



	SeqListDestory(&s1);
}


void test3()
{
	SL s1;

	SeqListInit(&s1);
	SeqListPushFront(&s1, 1);
	SeqListPushFront(&s1, 2);
	SeqListPushFront(&s1, 3);
	SeqListPushFront(&s1, 4);

	SeqListPopFront(&s1);
	SeqListPopFront(&s1);
	SeqListPopFront(&s1);
	SeqListPopFront(&s1);
	//SeqListErase(&s1, 1);

	SeqListPrint(&s1);


}


int main()
{
	//test1();
	//test2();
	test3();
	return 0;
}